package com.zhongfl.crm.model.boss;

import com.zhongfl.crm.enums.boss.WorkOrderSettleConfirmStatus;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.Objects;

/**
 * @author wang.yuchuan
 * @date 2018/5/8
 */
@Getter
@Setter
public class WorkOrderSettleConfirmResult extends WorkOrderSettle {

    private BackStatus back;

    private String backName;
    public String getBackName() {
        if(Objects.nonNull(back)){
            return back.getKey();
        }
        return StringUtils.EMPTY;
    }

    /**
     * 员工名称
     */
    private String staffName;


    /**
     * 是否确认状态, 0待确认 1已确认
     */
    private WorkOrderSettleConfirmStatus confirmStatus;

    private String confirmStatusName;

    public String getConfirmStatusName() {
        if (Objects.nonNull(confirmStatus)) {
            return confirmStatus.getDesc();
        }
        return StringUtils.EMPTY;
    }

    /**
     * 确认时间
     */
    private Date confirmTime;
}
